/**
 * 相关接口文档
 * https://docs.qq.com/doc/DWUdMeFZXZmdxSHlG
 *
 * 平台管理、店铺管理、公司管理、客户管理、客户列表、客户黑名单
 * https://www.showdoc.com.cn/jh5e010200/8422986813549967
 * jh123456
 *
 * 品牌管理、类目管理、客户详情
 * https://www.showdoc.com.cn/1290839963426937/8428049275099019
 *
 * 商品管理、销售属性、商品属性库
 * https://www.showdoc.com.cn/5eck1201/8529976056830691
 * 123456
 *
 * 订单管理、客服订单、售后订单、物流订单、无订单支付、审核管理
 * https://www.showdoc.com.cn/1888265382452569/8644563693546610
 *
 */

import { commonPromise } from '../index.js'

// 跨域代理前缀
// const API_PROXY_PREFIX = '/api'
const API_PROXY_PREFIX = ''
const BASE_URL = process.env.NODE_ENV === 'production' ? process.env.VUE_APP_API_BASE_URL : API_PROXY_PREFIX
// const BASE_URL = process.env.VUE_APP_API_BASE_URL

const beforeApi = {
  // 用户登录
  token: (params) => commonPromise({ params, url: `${BASE_URL}/auth/oauth/token`, method: 'get' }), // 用户登录
  roleNames: (params) => commonPromise({ params, url: `${BASE_URL}/sys/v1/user/employee/get/roleNames`, method: 'get' }), // 获取用户的角色名称列表
  getInfo: (params) => commonPromise({ params, url: `${BASE_URL}/sys/v1/user/getInfo`, method: 'get' }), // 获取登录用户信息
  menuTree: (params) => commonPromise({ params, url: `${BASE_URL}/sys/v1/menu/button/user/tree`, method: 'get' }), // 查询用户菜单/按钮权限
  bindOldAccount: (data) => commonPromise({ data, url: `${BASE_URL}/sys/v2/user/bindOldAccount`, method: 'post' }), // 绑定旧五域账号

  // 部门相关
  orgTree: (data) => commonPromise({ data, url: `${BASE_URL}/sys/v2/org/tree`, method: 'post' }), // 组织架构树
  orgTreeSelect: (data) => commonPromise({ data, url: `${BASE_URL}/sys/v2/org/tree/select`, method: 'post' }), // 组织架构树（选择组织）
  orgTreeSelectChild: (data) => commonPromise({ data, url: `${BASE_URL}/sys/v2/org/tree/selectChild`, method: 'post' }), // 指定部门组织架构树
  orgPageList: (data) => commonPromise({ data, url: `${BASE_URL}/sys/v2/org/pageList`, method: 'post' }), // 下级部门列表查询
  orgUpdateType: (data) => commonPromise({ data, url: `${BASE_URL}/sys/v2/org/updateType`, method: 'post' }), // 修改部门组织类型
  orgEmployeeList: (data) => commonPromise({ data, url: `${BASE_URL}/sys/v2/org/employeeList`, method: 'post' }), // 部门成员分页列表查询
  orgProcessOrgList: (data) => commonPromise({ data, url: `${BASE_URL}/sys/v1/common/processOrgList`, method: 'post' }), // 公司部门 -- 客服列表筛选中使用

  // 员工相关
  staffPageList: (data) => commonPromise({ data, url: `${BASE_URL}/sys/v2/user/employee/pageList`, method: 'post' }), // 员工分页列表查询
  staffListSelect: (data) => commonPromise({ data, url: `${BASE_URL}/sys/v2/user/position/listSelect`, method: 'post' }), // 职位列表查询
  staffUpdatePassword: (data) => commonPromise({ data, url: `${BASE_URL}/sys/v2/user/employee/updatePassword`, method: 'post' }), // 修改员工账号的密码
  staffDetail: (params) => commonPromise({ params, url: `${BASE_URL}/sys/v2/user/employee/detail`, method: 'get' }), // 查看员工详情
  staffUpdateWorkPhone: (data) => commonPromise({ data, url: `${BASE_URL}/sys/v2/user/employee/updateWorkPhone`, method: 'post' }), // 修改员工工作手机号

  // 角色相关
  rolePageList: (data) => commonPromise({ data, url: `${BASE_URL}/sys/v2/user/role/pageList`, method: 'post' }), // 角色分页列表查询
  roleUpdateAuth: (data) => commonPromise({ data, url: `${BASE_URL}/sys/v2/user/role/updateAuth`, method: 'post' }), // 修改角色绑定权限组

  // 权限相关
  permissionAllList: (params) => commonPromise({ params, url: `${BASE_URL}/sys/v2/user/auth/allList`, method: 'get' }), // 权限组列表查询
  permissionPageList: (data) => commonPromise({ data, url: `${BASE_URL}/sys/v2/user/auth/pageList`, method: 'post' }), // 权限组列表分页查询
  menuTreeSelect: (data) => commonPromise({ data, url: `${BASE_URL}/sys/v1/menu/button/tree/select`, method: 'post' }), // 权限组 - 菜单树
  permissionAdd: (data) => commonPromise({ data, url: `${BASE_URL}/sys/v2/user/auth/add`, method: 'post' }), // 新增权限组
  permissionDetail: (params) => commonPromise({ params, url: `${BASE_URL}/sys/v2/user/auth/details`, method: 'get' }), // 查看权限组详情
  permissionUpdateName: (data) => commonPromise({ data, url: `${BASE_URL}/sys/v2/user/auth/updateName`, method: 'post' }), // 修改权限组名称
  permissionBind: (data) => commonPromise({ data, url: `${BASE_URL}/sys/v2/user/auth/bind`, method: 'post' }), // 绑定权限组权限
  permissionDelete: (data) => commonPromise({ data, url: `${BASE_URL}/sys/v2/user/auth/delete`, method: 'post' }), // 删除权限组

  // 平台管理
  platformList: (data) => commonPromise({ data, url: `${BASE_URL}/order/v1-2/platform/pageList`, method: 'post' }), // 平台分页列表查询接口
  platformDetail: (params) => commonPromise({ params, url: `${BASE_URL}/order/v1-2/platform/get`, method: 'get' }), // 平台详情查询接口
  platformDataList: (data) => commonPromise({ data, url: `${BASE_URL}/order/v1-2/platform/dataList`, method: 'post' }), // 平台列表查询接口
  platformAdd: (data) => commonPromise({ data, url: `${BASE_URL}/order/v1-2/platform/add`, method: 'post' }), // 新增平台接口
  platformUpdate: (data) => commonPromise({ data, url: `${BASE_URL}/order/v1-2/platform/update`, method: 'post' }), // 编辑平台接口
  platformEnable: (data) => commonPromise({ data, url: `${BASE_URL}/order/v1-2/platform/enable`, method: 'post' }), // 启用平台接口
  platformDisable: (data) => commonPromise({ data, url: `${BASE_URL}/order/v1-2/platform/disable`, method: 'post' }), // 禁用平台接口
  platformDelete: (data) => commonPromise({ data, url: `${BASE_URL}/order/v1-2/platform/delete`, method: 'post' }), // 删除平台接口

  // 店铺管理
  shopList: (data) => commonPromise({ data, url: `${BASE_URL}/order/v1-2/shop/pageList`, method: 'post' }), // 平台分页列表查询接口
  shopDetail: (params) => commonPromise({ params, url: `${BASE_URL}/order/v1-2/shop/get`, method: 'get' }), // 店铺详情查询接口
  shopDataList: (data) => commonPromise({ data, url: `${BASE_URL}/order/v1-2/shop/dataList`, method: 'post' }), // 店铺列表查询接口
  shopAdd: (data) => commonPromise({ data, url: `${BASE_URL}/order/v1-2/shop/add`, method: 'post' }), // 新增店铺接口
  shopUpdate: (data) => commonPromise({ data, url: `${BASE_URL}/order/v1-2/shop/update`, method: 'post' }), // 修改店铺接口
  shopEnable: (data) => commonPromise({ data, url: `${BASE_URL}/order/v1-2/shop/enable`, method: 'post' }), // 启用店铺接口
  shopDisable: (data) => commonPromise({ data, url: `${BASE_URL}/order/v1-2/shop/disable`, method: 'post' }), // 禁用店铺接口
  shopDelete: (data) => commonPromise({ data, url: `${BASE_URL}/order/v1-2/shop/delete`, method: 'post' }), // 删除店铺接口

  // 公司管理
  companyList: (data) => commonPromise({ data, url: `${BASE_URL}/order/v1-2/company/pageList`, method: 'post' }), // 平台分页列表查询接口
  companyDetail: (params) => commonPromise({ params, url: `${BASE_URL}/order/v1-2/company/get`, method: 'get' }), // 公司详情查询接口
  companyDataList: (data) => commonPromise({ data, url: `${BASE_URL}/order/v1-2/company/dataList`, method: 'post' }), // 公司列表查询接口
  companyAdd: (data) => commonPromise({ data, url: `${BASE_URL}/order/v1-2/company/add`, method: 'post' }), // 新增公司接口
  companyUpdate: (data) => commonPromise({ data, url: `${BASE_URL}/order/v1-2/company/update`, method: 'post' }), // 编辑公司接口
  companyEnable: (data) => commonPromise({ data, url: `${BASE_URL}/order/v1-2/company/enable`, method: 'post' }), // 启用公司接口
  companyDisable: (data) => commonPromise({ data, url: `${BASE_URL}/order/v1-2/company/disable`, method: 'post' }), // 禁用公司接口
  companyDelete: (data) => commonPromise({ data, url: `${BASE_URL}/order/v1-2/company/delete`, method: 'post' }), // 删除公司接口

  // 客户管理
  customerAdd: (data) => commonPromise({ data, url: `${BASE_URL}/order/v1-2/customerUser/add`, method: 'post' }), // 新增客户接口
  customerDetails: (params) => commonPromise({ params, url: `${BASE_URL}/order/v1-2/customerUser/getUpdateDetails`, method: 'get' }), // 客户详情查询接口
  customerUpdate: (data) => commonPromise({ data, url: `${BASE_URL}/order/v1-2/customerUser/update`, method: 'post' }), // 修改客户接口
  customerOrderStatistics: (params) => commonPromise({ params, url: `${BASE_URL}/order/v1-2/customerUser/orderStatistics`, method: 'get' }), // 消费记录-统计信息查询接口
  customerOrderPageList: (data) => commonPromise({ data, url: `${BASE_URL}/order/v1-2/customerUser/orderPageList`, method: 'post' }), // 消费记录-订单分页列表查询接口
  customerAllocationList: (data) => commonPromise({ data, url: `${BASE_URL}/sys/v1/notice/customer/list`, method: 'post' }), // 分配记录-分页列表查询接口
  customerTrackingPageList: (data) => commonPromise({ data, url: `${BASE_URL}/order/v1-2/customerUser/trackingPageList`, method: 'post' }), // 跟进记录-分页列表查询接口
  customerAddTracking: (data) => commonPromise({ data, url: `${BASE_URL}/order/v1-2/customerUser/addTracking`, method: 'post' }), // 跟进记录-新增跟进记录
  customerHistoryPageList: (data) => commonPromise({ data, url: `${BASE_URL}/order/v1-2/customerUser/historyPageList`, method: 'post' }), // 客户记录-分页列表查询接口
  customerGetFollowUp: (data) => commonPromise({ data, url: `${BASE_URL}/order/trackingRecording/page`, method: 'post' }), // 跟进类型数据获取
  customerAddFollowUp: (data) => commonPromise({ data, url: `${BASE_URL}/order/comm/customertracking/add`, method: 'post' }), // 新增跟进记录
  checkFollowCustomer: (data) => commonPromise({ data, url: `${BASE_URL}/order/comm/customeruser/checkFollowCustomer`, method: 'post' }), // 检查该客户是否已被客服跟进
  customerAnswerCondition: (data) => commonPromise({ data, url: `${BASE_URL}/order/comm/customertracking/add`, method: 'post' }), // 接听状况
  customerWeChatCondition: (data) => commonPromise({ data, url: `${BASE_URL}/order/comm/customertracking/add`, method: 'post' }), // 微信状况
  selectServiceMessage: (data) => commonPromise({ data, url: `${BASE_URL}/order/v1-2/customerUser/findSysUser`, method: 'post' }), // 微信状况

  // 客户管理 => 资源列表
  customerAssignPageList: (data) => commonPromise({ data, url: `${BASE_URL}/order/v1-2/customerUser/assignPageList`, method: 'post' }), // 客户列表-分页列表查询接口
  customerTaskNumber: (params) => commonPromise({ params, url: `${BASE_URL}/order/order/return/taskNumber`, method: 'get' }), // 客户列表-未分配客户 / 可分配 - 总数
  assignorList: (params) => commonPromise({ params, url: `${BASE_URL}/order/v1-2/customerUser/assignorList`, method: 'get' }), // 客户列表-分配人列表
  customerAllocation: (data) => commonPromise({ data, url: `${BASE_URL}order/v1/customer/channel/customer/assign`, method: 'post' }), // 分配
  customerImport: (data) => commonPromise({ data, url: `${BASE_URL}/order/v1/customer/channel/onekey/import/hoooker/page`, method: 'post' }), // 分配
  resourceDelete: (data) => commonPromise({ data, url: `${BASE_URL}/order/customerChannelUserInfo/deleteByIds`, method: 'post' }), // 删除
  resourceFeedback: (data) => commonPromise({ data, url: `${BASE_URL}/order/v1-2/customerUser/customertrackingExport`, method: 'post' }), // 分配
  getAllTagDataList: (params) => commonPromise({ params, url: `${BASE_URL}/basic/classifyGroup/getAllTagDataList`, method: 'get' }), // 获取全部人群列表(包含分层下拉)
  tagGetAllTagDataList: (params) => commonPromise({ params, url: `${BASE_URL}/basic/tag/getAllTagDataList`, method: 'get' }), // 获取全部标签列表(包含分层下拉)

  // 客户详情
  categoryShippingAddress: (params) => commonPromise({ params, url: `${BASE_URL}/order/comm/customeraddress/list`, method: 'get' }), // 查询收货地址列表
  categoryDetails: (params) => commonPromise({ params, url: `${BASE_URL}/order/comm/customeruser/selectById`, method: 'get' }), // 查询客户详情
  categoryDefaultSite: (params) => commonPromise({ params, url: `${BASE_URL}/order/comm/customeraddress/isTop`, method: 'get' }), // 设置收货地址列表默认为默认地址
  categoryAddaddress: (data) => commonPromise({ data, url: `${BASE_URL}/order/comm/customeraddress/add`, method: 'post' }), // 添加收货地址
  categoryEditaddress: (data) => commonPromise({ data, url: `${BASE_URL}/order/comm/customeraddress/update`, method: 'post' }), // 修改收货地址
  categoryDeleteAddress: (params) => commonPromise({ params, url: `${BASE_URL}/order/comm/customeraddress/delete`, method: 'get' }), // 删除收货地址
  selectDefAddress: (params) => commonPromise({ params, url: `${BASE_URL}/order/comm/customeraddress/selectDefAddress`, method: 'get' }), // 默认收货地址
  categoryeditFollowup: (data) => commonPromise({ data, url: `${BASE_URL}/order/comm/customeruser/updateMessageById`, method: 'post' }), // 修改跟进信息

  // 客户详情--消费记录
  inquireLogisticsInformation: (params) => commonPromise({ params, url: `${BASE_URL}/order/logistics/getByOrderId`, method: 'get' }), // 查询订单的物流信息
  inquireLogisticsNode: (params) => commonPromise({ params, url: `${BASE_URL}/order/logistics/node/tracking/`, method: 'get' }), // 查询物流节点跟踪

  // 客户管理 => 客户黑名单
  blackListPageList: (data) => commonPromise({ data, url: `${BASE_URL}/order/v1-2/customerUser/blackListPageList`, method: 'post' }), // 客户黑名单分页列表查询接口
  removeFromBlackList: (data) => commonPromise({ data, url: `${BASE_URL}/order/v1-2/customerUser/removeFromBlackList`, method: 'post' }), // 移出黑名单
  addBlackList: (data) => commonPromise({ data, url: `${BASE_URL}/order/v1-2/customerUser/addBlackList`, method: 'post' }), // 加入黑名单

  selectCustomerditch: (params) => commonPromise({ params, url: `${BASE_URL}/order/comm/customeruser/selectCustomerditch`, method: 'get' }), // 入栈方式、渠道（数据来源【入线渠道设定】）
  salesAuthority: (params) => commonPromise({ params, url: `${BASE_URL}/sys/v1/user/employee/by/sales/authority`, method: 'get' }), // 跟进客服
  orgTreeList: (data) => commonPromise({ data, url: `${BASE_URL}/sys/v1/org/tree/select`, method: 'post' }), // 部门编码

  // 类目管理
  categoryQuery: (params) => commonPromise({ params, url: `${BASE_URL}/order/comm/commodityCategory/list`, method: 'get' }), // 数据查询/列表
  categoryAdd: (data) => commonPromise({ data, url: `${BASE_URL}/order/comm/commodityCategory/add`, method: 'post' }), // 新增分类
  categoryForbidden: (params) => commonPromise({ params, url: `${BASE_URL}/order/comm/commodityCategory/disable`, method: 'get' }), // 禁用类目
  categoryEnable: (params) => commonPromise({ params, url: `${BASE_URL}/order/comm/commodityCategory/enable`, method: 'get' }), // 启用类目
  categoryEdit: (data) => commonPromise({ data, url: `${BASE_URL}/order/comm/commodityCategory/edit`, method: 'post' }), // 编辑类目
  categoryCascadeDate: (params) => commonPromise({ params, url: `${BASE_URL}/order/comm/commodityCategory/extracted`, method: 'get' }), // 新增分类级联选择器数据
  categoryCompileClassify: (params) => commonPromise({ params, url: `${BASE_URL}/order/comm/commodityCategory/findById`, method: 'get' }), // 点击编辑获取分类数据

  // 品牌管理
  brandList: (params) => commonPromise({ params, url: `${BASE_URL}/order/comm/brand/list`, method: 'get' }), // 品牌管理列表数据
  brandAdd: (data) => commonPromise({ data, url: `${BASE_URL}/order/comm/brand/add`, method: 'post' }), // 新增品牌
  brandEdit: (data) => commonPromise({ data, url: `${BASE_URL}/order/comm/brand/edit`, method: 'post' }), // 编辑品牌
  brandDate: (params) => commonPromise({ params, url: `${BASE_URL}/order/comm/commodityCategory/commList`, method: 'get' }), // 新增分类级联选择器数据

  // 类目列表
  categoryList: (params) => commonPromise({ params, url: `${BASE_URL}/order/comm/commodityCategory/commList`, method: 'get' }), // 类目列表

  // 跟进记录设置
  getFollowUpRecord: (data) => commonPromise({ data, url: `${BASE_URL}/order/trackingRecording/page`, method: 'post' }), // 跟进记录设定列表
  setFollowUpRecord: (data) => commonPromise({ data, url: `${BASE_URL}/order/trackingRecording/add`, method: 'post' }), // 新增跟进记录
  updateFollowUpRecord: (data) => commonPromise({ data, url: `${BASE_URL}/order/trackingRecording/update`, method: 'post' }), // 修改跟进记录

  // 商品管理
  countGroupByStatus: (params) => commonPromise({ params, url: `${BASE_URL}/goods/goods/getCountGroupByStatus`, method: 'get' }), // 商品列表数量统计查询接口
  goodsPageList: (data) => commonPromise({ data, url: `${BASE_URL}/goods/goods/pageList`, method: 'post' }), // 商品分页列表查询
  goodsDetail: (data) => commonPromise({ data, url: `${BASE_URL}/goods/goods/get`, method: 'post' }), // 商品详情查询
  goodsAdd: (data) => commonPromise({ data, url: `${BASE_URL}/goods/goods/add`, method: 'post' }), // 新增商品
  goodsEdit: (data) => commonPromise({ data, url: `${BASE_URL}/goods/goods/edit`, method: 'post' }), // 编辑商品
  goodsPutOn: (data) => commonPromise({ data, url: `${BASE_URL}/goods/goods/putOn`, method: 'post' }), // 批量上架商品
  goodsPutOff: (data) => commonPromise({ data, url: `${BASE_URL}/goods/goods/putOff`, method: 'post' }), // 批量下架商品
  goodsDelete: (data) => commonPromise({ data, url: `${BASE_URL}/goods/goods/delete`, method: 'post' }), // 删除商品
  gkuNoByGoodId: (data) => commonPromise({ data, url: `${BASE_URL}/goods/goodsSku/getSkuNoByGoodId`, method: 'post' }), // 生成sku编码
  goodsExport: (data) => commonPromise({ data, url: `${BASE_URL}/goods/goods/goodsExport`, method: 'post' }), // 商品导出

  // 商品属性库
  goodsAttrListByCategoryId: (params) => commonPromise({ params, url: `${BASE_URL}/goods/attr/listByCategoryId`, method: 'get' }), // 类目商品属性库列表查询
  goodsAttrGetGroup: (params) => commonPromise({ params, url: `${BASE_URL}/goods/attr/getGroup`, method: 'get' }), // 商品属性组详情查询
  goodsAttrAddGroup: (data) => commonPromise({ data, url: `${BASE_URL}/goods/attr/addGroup`, method: 'post' }), // 新增属性组
  goodsAttrEditGroup: (data) => commonPromise({ data, url: `${BASE_URL}/goods/attr/editGroup`, method: 'post' }), // 编辑属性组
  goodsAttrSortGroupUp: (data) => commonPromise({ data, url: `${BASE_URL}/goods/attr/sortGroupUp`, method: 'post' }), // 上移属性组
  goodsAttrSortGroupDown: (data) => commonPromise({ data, url: `${BASE_URL}/goods/attr/sortGroupDown`, method: 'post' }), // 下移属性组
  goodsAttrSortGroupDelete: (data) => commonPromise({ data, url: `${BASE_URL}/goods/attr/deleteGroup`, method: 'post' }), // 删除属性组
  goodsAttrDetail: (params) => commonPromise({ params, url: `${BASE_URL}/goods/attr/get`, method: 'get' }), // 商品属性详情查询
  goodsAttrAdd: (data) => commonPromise({ data, url: `${BASE_URL}/goods/attr/add`, method: 'post' }), // 新增属性
  goodsAttrEdit: (data) => commonPromise({ data, url: `${BASE_URL}/goods/attr/edit`, method: 'post' }), // 编辑属性
  goodsAttrSortUp: (data) => commonPromise({ data, url: `${BASE_URL}/goods/attr/sortUp`, method: 'post' }), // 上移属性
  goodsAttrSortDown: (data) => commonPromise({ data, url: `${BASE_URL}/goods/attr/sortDown`, method: 'post' }), // 下移属性
  goodsAttrDelete: (data) => commonPromise({ data, url: `${BASE_URL}/goods/attr/delete`, method: 'post' }), // 删除属性
  goodsNumber: (data) => commonPromise({ data, url: `${BASE_URL}/goods/goods/generateNo`, method: 'post' }), // 生成商品编号

  // 销售属性
  salesPecPageList: (data) => commonPromise({ data, url: `${BASE_URL}/goods/spec/pageList`, method: 'post' }), // 销售属性分页列表查询接口
  salesPecDetail: (params) => commonPromise({ params, url: `${BASE_URL}/goods/spec/get`, method: 'get' }), // 销售属性详情查询
  salesPecAdd: (data) => commonPromise({ data, url: `${BASE_URL}/goods/spec/add`, method: 'post' }), // 新增规格接口
  salesPecEdit: (data) => commonPromise({ data, url: `${BASE_URL}/goods/spec/edit`, method: 'post' }), // 编辑规格接口
  salesPecEnable: (data) => commonPromise({ data, url: `${BASE_URL}/goods/spec/enable`, method: 'post' }), // 启用规格
  salesPecDisable: (data) => commonPromise({ data, url: `${BASE_URL}/goods/spec/disable`, method: 'post' }), // 禁用规格
  salesPecdDlete: (data) => commonPromise({ data, url: `${BASE_URL}/goods/spec/delete`, method: 'post' }), // 删除规格
  salesPecdAddGroup: (data) => commonPromise({ data, url: `${BASE_URL}/goods/spec/addGroup`, method: 'post' }), // 新增属性组
  // ---------------------------------------------------------------------------------------------------------------------------------------------------------------------

  // 审批流设置
  processPageList: (data) => commonPromise({ data, url: `${BASE_URL}/sys/process/config/pageList`, method: 'post' }), // 审批流分页列表查询接口
  processAdd: (data) => commonPromise({ data, url: `${BASE_URL}/sys/process/config/add`, method: 'post' }), // 新增审批流
  processEdit: (data) => commonPromise({ data, url: `${BASE_URL}/sys/process/config/update`, method: 'post' }), // 新增审批流
  processDetails: (data) => commonPromise({ data, url: `${BASE_URL}/sys/process/config/details`, method: 'post' }), // 审批流详情
  processDelete: (data) => commonPromise({ data, url: `${BASE_URL}/sys/process/config/delete`, method: 'post' }), // 删除审批流
  processRoleList: (params) => commonPromise({ params, url: `${BASE_URL}/sys/process/config/roleList`, method: 'get' }), // 部门角色列表
  processUserList: (params) => commonPromise({ params, url: `${BASE_URL}/sys/process/config/userList`, method: 'get' }), // 部门角色筛选用户列表

  // 审批任务
  processGetPassFlag: (params) => commonPromise({ params, url: `${BASE_URL}/sys/process/task/getPassFlag`, method: 'get' }), // 获取是否可以跳过审批（0否，1是）
  processSubmit: (data) => commonPromise({ data, url: `${BASE_URL}/sys/process/task/submit`, method: 'post' }), // 发起审批
  processApprove: (data) => commonPromise({ data, url: `${BASE_URL}/sys/process/task/approve`, method: 'post' }), // 提交审批结果
  processGetHistory: (data) => commonPromise({ data, url: `${BASE_URL}/neworder/process/task/getHistory`, method: 'post' }), // 查询审批结果
  processCancel: (data) => commonPromise({ data, url: `${BASE_URL}/sys/process/task/cancel`, method: 'post' }), // 撤回/取消审批

  // 订单审核
  orderPageList: (data) => commonPromise({ data, url: `${BASE_URL}/neworder/order/submitTask/pageList`, method: 'post' }), // 订单审核分页列表查询接口
  applierList: (params) => commonPromise({ params, url: `${BASE_URL}/neworder/order/submitTask/applierList`, method: 'get' }), // 跟进客服列表
  approverList: (params) => commonPromise({ params, url: `${BASE_URL}/neworder/order/submitTask/approverList`, method: 'get' }), // 审核人列表
  doPass: (data) => commonPromise({ data, url: `${BASE_URL}/neworder/order/submitTask/doPass`, method: 'post' }), // 批量通过
  doReject: (data) => commonPromise({ data, url: `${BASE_URL}/neworder/order/submitTask/doReject`, method: 'post' }), // 批量驳回

  // 下单流程
  getPlaceGoodsCount: (data) => commonPromise({ data, url: `${BASE_URL}/goods/goods/getPlaceGoodsCount`, method: 'post' }), // 下单-选购商品数量统计查询接口
  selectPlaceGoodsPageList: (data) => commonPromise({ data, url: `${BASE_URL}/goods/goods/placeGoodsPageList`, method: 'post' }), // 下单-选购商品分页列表查询
  placeOrder: (data) => commonPromise({ data, url: `${BASE_URL}/neworder/order/main/placeOrder`, method: 'post' }), // 提交订单
  customeruser: (data) => commonPromise({ data, url: `${BASE_URL}/order/comm/customeruser/selectById`, method: 'post' }), // 下单-查询客户基本信息
  getPassFlag: (params) => commonPromise({ params, url: `${BASE_URL}/neworder/process/task/getPassFlag`, method: 'get' }), // 下单-是否必审核接口
  selectList: (params) => commonPromise({ params, url: `${BASE_URL}/order/comm/commodity/selectList`, method: 'get' }), // 下单-是否必审核接口

  // 订单详情
  onlinePay: (data) => commonPromise({ data, url: `${BASE_URL}/neworder/order/comm/onlinePay`, method: 'post' }), // 生成收款码-在线支付
  byOrderIdList: (params) => commonPromise({ params, url: `${BASE_URL}/neworder/orderTradingRecord/byOrderIdList`, method: 'get' }), // 交易记录
  getOrderStatusByOrderId: (data) => commonPromise({ data, url: `${BASE_URL}/neworder/orderDetail/getOrderStatusByOrderId`, method: 'post' }), // (状态节点）订单状态信息查询
  getLogisticsStatusByOrderId: (data) => commonPromise({ data, url: `${BASE_URL}/neworder/order/logistics/getLogisticsStatusByOrderId`, method: 'post' }), // (物流信息）订单状态信息查询
  getProcessByOrderId: (data) => commonPromise({ data, url: `${BASE_URL}/neworder/orderDetail/getProcessByOrderId`, method: 'post' }), // (审批结果信息）订单状态信息查询
  getCloseStatusByOrderId: (data) => commonPromise({ data, url: `${BASE_URL}/neworder/orderDetail/getCloseStatusByOrderId`, method: 'post' }), // （关闭订单）订单状态信息查询
  getOrderDetail: (data) => commonPromise({ data, url: `${BASE_URL}/neworder/orderDetail/get`, method: 'post' }), // 获取订单信息
  applyAfterSales: (data) => commonPromise({ data, url: `${BASE_URL}/neworder/order/after/applyAfterSales`, method: 'post' }), // 申请售后
  getBuyInfo: (data) => commonPromise({ data, url: `${BASE_URL}/neworder/orderDetail/getBuyInfo`, method: 'post' }), // 获取订单购买信息
  getOrderGoodsInfo: (data) => commonPromise({ data, url: `${BASE_URL}/neworder/orderDetail/getOrderGoodsInfo`, method: 'post' }), // 获取订单商品信息
  updateOrderAddress: (data) => commonPromise({ data, url: `${BASE_URL}/neworder/order/logistics/updateOrderAddress`, method: 'post' }), // 修改订单地址
  resubmitOrder: (data) => commonPromise({ data, url: `${BASE_URL}/neworder/orderDetail/resubmitOrder`, method: 'post' }), // 重新提交订单
  updateRemark: (data) => commonPromise({ data, url: `${BASE_URL}/neworder/orderDetail/updateRemark`, method: 'post' }), // 修改备注
  serviceConfirmReceipt: (data) => commonPromise({ data, url: `${BASE_URL}/neworder/order/main/confirmReceipt`, method: 'post' }), // 客服订单确认收货接口
  closeOrder: (data) => commonPromise({ data, url: `${BASE_URL}/neworder/order/main/customerCloseOrder`, method: 'post' }), // 客服手动关闭订单接口
  getNumber: (params) => commonPromise({ params, url: `${BASE_URL}/neworder/order/applier/getBugCount`, method: 'get' }), // 客服手动关闭订单接口
  wuliuCloseOrder: (data) => commonPromise({ data, url: `${BASE_URL}/neworder/order/main/closeOrder`, method: 'post' }), // 物流手动关闭订单接口

  // 客服订单
  submitExamine: (data) => commonPromise({ data, url: `${BASE_URL}/neworder/order/comm/submit`, method: 'post' }), // 发起/提交审批
  updateLogistics: (data) => commonPromise({ data, url: `${BASE_URL}/neworder/order/comm/updateLogistics`, method: 'post' }), // 修改客服订单物流单号
  servicePageList: (data) => commonPromise({ data, url: `${BASE_URL}/neworder/order/applier/pageList`, method: 'post' }), // 客服订单分页列表查询接口
  outWebExport: (data) => commonPromise({ data, url: `${BASE_URL}/neworder/order/applier/outWeb/export`, method: 'post' }), // 站外订单物流透视
  applierExport: (data) => commonPromise({ data, url: `${BASE_URL}/neworder/order/applier/export`, method: 'post' }), // 订单导出
  getStatusCount: (data) => commonPromise({ data, url: `${BASE_URL}/neworder/order/applier/getStatusCount`, method: 'post' }), // 订单数量统计查询接口
  tianlanExport: (data) => commonPromise({ data, url: `${BASE_URL}neworder/order/applier/tianlan/export`, method: 'post' }), // 微商导出
  kefuExport: (data) => commonPromise({ data, url: `${BASE_URL}neworder/order/applier/kefu/export`, method: 'post' }), // 客服导出
  serviceDeriveStatistics: (data) => commonPromise({ data, url: `${BASE_URL}/neworder/order/applier/jianchi/timeReport/export`, method: 'post' }), // 健驰统计数据导出
  promotionDeriveStatistics: (data) => commonPromise({ data, url: `${BASE_URL}/neworder/order/applier/tianlan/timeReport/export`, method: 'post' }), // 天兰统计数据导出
  // 售后订单
  afterPageList: (data) => commonPromise({ data, url: `${BASE_URL}/neworder/order/after/pageList`, method: 'post' }), // 售后订单分页列表查询接口
  afterRecordsList: (data) => commonPromise({ data, url: `${BASE_URL}/neworder/order/after/recordsList`, method: 'post' }), // 售后订单-售后记录分页列表查询接口
  afterDoApprove: (data) => commonPromise({ data, url: `${BASE_URL}/neworder/order/main/doApprove`, method: 'post' }), // 顶大批量审核
  afterSaleDoApprove: (data) => commonPromise({ data, url: `${BASE_URL}/neworder/order/after/doApprove`, method: 'post' }), // 售后批量审核

  afterDoCancel: (data) => commonPromise({ data, url: `${BASE_URL}/neworder/order/after/doCancel`, method: 'post' }), // 撤回售后
  afterGetHistory: (params) => commonPromise({ params, url: `${BASE_URL}/neworder/order/after/getHistory`, method: 'get' }), // 查询审批结果
  afterUpdateLogistics: (data) => commonPromise({ data, url: `${BASE_URL}/neworder/after/logistics/updateLogistics`, method: 'post' }), // 修改售后物流单号
  afterConfirmReceipt: (data) => commonPromise({ data, url: `${BASE_URL}/neworder/order/after/confirmReceipt`, method: 'post' }), // 售后订单确认收货接口

  // 物流订单
  logisticsGetStatusCount: (params) => commonPromise({ params, url: `${BASE_URL}/neworder/order/logistics/getStatusCount`, method: 'get' }), // 物流订单分页数量统计查询接口
  logisticsPageList: (data) => commonPromise({ data, url: `${BASE_URL}/neworder/order/logistics/pageList`, method: 'post' }), // 物流订单分页列表查询接口
  logisticsAfterPageList: (data) => commonPromise({ data, url: `${BASE_URL}/neworder/order/logistics/afterPageList`, method: 'post' }), // 物流售后订单分页列表查询接口
  logisticsDoArrange: (data) => commonPromise({ data, url: `${BASE_URL}/neworder/order/logistics/doArrange`, method: 'post' }), // （批量）备货
  logisticsRecordsPage: (data) => commonPromise({ data, url: `${BASE_URL}/neworder/order/logistics/logisticsRecordsPage`, method: 'post' }), // 导出记录列表查询
  logisticsExport: (data) => commonPromise({ data, url: `${BASE_URL}/neworder/order/logistics/logisticsExport`, method: 'post' }), // 导出发货
  afterImportLogistics: (data) => commonPromise({ data, url: `${BASE_URL}/neworder/after/logistics/afterImportLogistics?updateSupport=false`, method: 'post' }), // 售后单导入&修改物流单
  afterDownloadExportError: (data) => commonPromise({ data, url: `${BASE_URL}/neworder/order/logistics/afterDownloadExportError`, method: 'post' }), // 售后单下载导入失败订单
  afterReImportLogistics: (data) => commonPromise({ data, url: `${BASE_URL}/neworder/order/logistics/afterReImportLogistics`, method: 'post' }), // 售后单重新提交导入失败订单
  afterUpdateNumber: (data) => commonPromise({ data, url: `${BASE_URL}/neworder/order/logistics/afterUpdateNumber`, method: 'post' }), // 售后单手动发货
  importLogistics: (data) => commonPromise({ data, url: `${BASE_URL}/neworder/order/logistics/importLogistics?updateSupport=false`, method: 'post' }), // 导入&修改物流单
  downloadExportError: (data) => commonPromise({ data, url: `${BASE_URL}/neworder/order/logistics/downloadExportError`, method: 'post' }), // 下载导入失败订单
  reImportLogistics: (data) => commonPromise({ data, url: `${BASE_URL}/neworder/order/logistics/reImportLogistics`, method: 'post' }), // 重新提交导入失败订单
  updateNumber: (data) => commonPromise({ data, url: `${BASE_URL}/neworder/order/logistics/updateNumber`, method: 'post' }), // 手动发货
  commWarehouse: (data) => commonPromise({ data, url: `${BASE_URL}/order/comm/commWarehouse/list`, method: 'post' }), // 仓库列表
  updateOrderMainLogisticsException: (data) => commonPromise({ data, url: `${BASE_URL}/neworder/order/comm/updateOrderMainLogisticsException`, method: 'post' }), // 物流异常

  // 售后详情
  getAfterOrderStatusById: (data) => commonPromise({ data, url: `${BASE_URL}/neworder/orderAfterDetail/getAfterOrderStatusById`, method: 'post' }), // （状态节点）订单状态信息查询
  getRefundById: (data) => commonPromise({ data, url: `${BASE_URL}/neworder/orderAfterDetail/getRefundById`, method: 'post' }), // 售后订单状态退款信息查询
  getLogisticsByAfterId: (data) => commonPromise({ data, url: `${BASE_URL}/neworder/after/logistics/getLogisticsByAfterId`, method: 'post' }), // 售后订单状态物流信息查询
  selectExchangeGoodsById: (data) => commonPromise({ data, url: `${BASE_URL}/neworder/after/logistics/selectExchangeGoodsById`, method: 'post' }), // 查看换货物流信息
  getDetailById: (data) => commonPromise({ data, url: `${BASE_URL}/neworder/orderAfterDetail/getDetailById`, method: 'post' }), // 售后订单商品信息查询
  selectReturnById: (data) => commonPromise({ data, url: `${BASE_URL}/neworder/after/logistics/selectReturnById`, method: 'post' }), // 查看退货物流信息

  // 订单管理公共接口
  close: (data) => commonPromise({ data, url: `${BASE_URL}/neworder/order/main/closeOrder`, method: 'post' }), // 关闭订单
  confirmReceipt: (data) => commonPromise({ data, url: `${BASE_URL}/neworder/order/main/confirmReceipt`, method: 'post' }), // 确认收货
  getLogisticsInfo: (data) => commonPromise({ data, url: `${BASE_URL}/neworder/order/comm/getLogisticsInfo`, method: 'post' }), // 物流查询
  getTaskHistory: (data) => commonPromise({ data, url: `${BASE_URL}/neworder/process/task/getHistory`, method: 'post' }), // 查询审批结果
  // -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  // 公共接口
  brandCommList: (params) => commonPromise({ params, url: `${BASE_URL}/order/comm/brand/commList`, method: 'get' }), // 品牌管理列表数据
  goodsAttrDataList: (params) => commonPromise({ params, url: `${BASE_URL}/goods/attr/dataList`, method: 'get' }), // 类目商品属性库列表查询
  categorySalesPecDetail: (params) => commonPromise({ params, url: `${BASE_URL}/goods/spec/listByCategoryId`, method: 'get' }), // 查询指定类目的销售属性
  dictionaries: (params) => commonPromise({ params, url: `${BASE_URL}/sys/v1/common/by/group`, method: 'get' }), // 字典查询
  dictionariesOld: (params) => commonPromise({ params, url: `${BASE_URL}/sys/v1/common/win/type`, method: 'get' }), // 字典查询 old
  uploadFiles: (data) => commonPromise({ data, url: `${BASE_URL}/sys/v1/common/upload/files?pathName=internalSystem`, method: 'post' }), // 上传文件
  uploadFilesExport: (data) => commonPromise({ data, url: `${BASE_URL}/neworder/order/applier/outWeb/export?type=1`, method: 'post' }), // 上传文件 - 站外订单物流透视
  // 内部出库
  addInteriorOrder: (data) => commonPromise({ data, url: `${BASE_URL}/order/v1/internal/interiorOrder/addInteriorOrder`, method: 'post' }), // 上传文件 - 站外订单物流透视
  // -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  //标签库接口
  selectTagData: (data) => commonPromise({ data, url: `${BASE_URL}/goods/goodsTag/selectTagData`, method: 'post' }),//标签库下拉查询
  tagList: (data) => commonPromise({ data, url: `${BASE_URL}/goods/goodsTag/pageList`, method: 'post' }),//标签库列表接口
  enableTag: (data) => commonPromise({ data, url: `${BASE_URL}/goods/goodsTag/enable`, method: 'post' }),//标签库列表启用停用接口
  showToIndex: (data) => commonPromise({ data, url: `${BASE_URL}/goods/goodsTag/show`, method: 'post' }),//标签库列表是否展示首页接口
  deleteLabel: (data) => commonPromise({ data, url: `${BASE_URL}/goods/goodsTag/delete`, method: 'post' }),//标签库列表删除口
  saveTag: (data) => commonPromise({ data, url: `${BASE_URL}/goods/goodsTag/save`, method: 'post' }),//标签库列表删除口
  getLabelInfo: (data) => commonPromise({ data, url: `${BASE_URL}/goods/goodsTag/getInfo`, method: 'post' }),//标签库列表删除口
	
}

// const apiFetch = Object.assign({}, beforeApi)
// console.log(apiFetch)
export default beforeApi
